import request from '@/utils/request'

//查询贷款信息
export function findLoanList(data) {
  return request({
    url: '/loan/loan/findLoanList/' + data,
    method: 'get'
  })
}
//查询还款信息
export function findRepaymentList(data) {
  return request({
    url: '/loan/loan/findRepaymentList/' + data,
    method: 'get'
  })
}

//查询今日是否签到
export function selectSign(data) {
  return request({
    url: '/loan/loan/selectSign/' + data,
    method: 'get'
  })
}
//签到
export function sign(data) {
  return request({
    url: '/loan/loan/sign/' + data,
    method: 'get'
  })
}

//抽奖
export function raffle(data) {
  return request({
    url: '/loan/loan/raffle/' + data,
    method: 'get'
  })
}

//查询用户信息
export function findUserByUid(data) {
  return request({
    url: '/loan/loan/findUserByUid/' + data,
    method: 'get'
  })
}

//计算应还金额
export function loan(data) {
  return request({
    url: '/loan/loan/calculate',
    method: 'post',
    data: data
  })
}

//生成合同
export function saveLoan(data) {
  return request({
    url: '/loan/loan/saveLoan',
    method: 'post',
    data: data
  })
}

export function productList() {
  return request({
    url: '/product/productList',
    method: 'get',
  })
}

